<template>
  <span class="check-box-event">
      <input type="checkbox" :checked="checked" :disabled="disabled" /> {{label}}
  </span>
</template>

<script lang="ts">
    import Vue from 'vue';
    import Component from 'vue-class-component';
    import { Prop,Watch }from 'vue-property-decorator'

    @Component({
        // 所有的组件选项都可以放在这里
        // 组件必须有这个注解
    })

    export default class checkbox extends Vue {
        // data 在这
        // @Prop({
        //     type: [String, Number],
        //     required: false,
        //     default: ''
        // }) value !: String;
        @Prop({
            type: [String, Number],
            required: false,
            default: ''
        }) label !: String;
        @Prop({
            type: Boolean,
            required: false,
            default: false
        }) checked !: Boolean;
        @Prop({
            type: Boolean,
            required: false,
            default: false
        }) disabled !: Boolean;
    }
</script>
<style lang="scss">
.check-box-event{
    input{
        vertical-align: middle;
        cursor: pointer;
    }
}
</style>